<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>FDTextArea test</title>
<!-- css -->
<link id="fd_theme" href="../../styles/theme/aristo/theme.css" rel="stylesheet" type="text/css" />
<link href="../../styles/primeui-1.1-min.css" rel="stylesheet" type="text/css" />
<style type="text/css">
body{font-size: 12px}
</style>
<!-- lib -->
<script type="text/javascript" src="../../src/FDLib/FDLib.js"></script>
<script type="text/javascript" src="../../src/JsMap.js"></script>
<!-- app js -->
<script type="text/javascript" src="../theme.js"></script>
</head>
<body>
<div id="remark"></div>
<button onclick="setValue()">setValue</button>
<button onclick="getValue()">getValue</button>
<button onclick="getData()">getData</button>
<button onclick="disable()">disable</button>
<button onclick="enable()">enable</button>
<button onclick="hide()">hide</button>
<button onclick="show()">show</button>
<br>
<button onclick="validate()">validate</button>

<script type="text/javascript">
FDLib.setDir('../../src/');
var remark;
FDLib.loadJs('FDTextArea',function() {
	remark = new FDTextArea({domId:'remark'
		//,width:300,height:80
		,name:'addr',label:'地址:',labelValign:'top'
		,validates:[new FDValidate({minLength:4,maxLength:10})]});
});

function getValue() {
	var val = remark.getValue()
	alert(val)
}
function setValue() {
	remark.setValue('</i>zhangsan</i>');
	
}
function getData() {
	var data = remark.getData()
	var s = '';
	for(var key in data) {
		s += key + ":" + data[key]
	}
	
	alert(s);
}
function disable() {
	remark.disable();
}
function enable() {
	remark.enable();
}
function show() {
	remark.show();
}
function hide() {
	remark.hide();
}

function validate() {
	var val = remark.validate();
	alert(val)
} 
</script>
</body>
</html>